Binary Codes for Fast Determination of Ancestor-Descendant Relationships in Trees

نویسندگان

  • Natarajan Meghanathan
  • Sanjeev Baskiyar
چکیده

This paper proposes a new coding scheme and an algorithm to determine ancestordescendant relationship among nodes in a tree without tree traversal. Each node in a tree is assigned a unique binary code. The algorithm and the binary coding approach were tested with trees of different heights and widths. The algorithm is of O(1) complexity versus O(d) for tree traversal, where d is the depth of the tree. The algorithm can be used to determine, in O(1) time, the superclass-subclass relationship either at compile-time or at run-time in an object-oriented (OO) programming environment.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Binary Codes for Fast Determination of Ancestor-Descendant Relationship in Trees and Directed A-cyclic Graphs

This paper develops simple binary codes, called Binary Ancestry (BA) codes, for trees using which ancestor-descendant relationships among any two nodes of a tree can be determined without tree traversal. The BA coding technique assigns unique binary codes to each node of a tree. A procedure, IsAncestor, that uses BA codes to determine the relationships, yielded correct results in sample trees o...

متن کامل

Implementation of the Binary Coding Scheme and the Tree Traversal Algorithms to Test for Ancestor- Descendant Relationships in K-ary Trees

This paper discusses the implementation of the binary coding scheme and its comparison with the post-order, preorder and in-order traversal techniques to test for ancestor-descendant relationships in k-ary trees (a tree in which any leaf node has up to k children). The approach used is assigning a unique binary code to each node in a tree. The value of the binary code for a node is the concaten...

متن کامل

Assessment of Student Learning Associated with Tree Thinking in an Undergraduate Introductory Organismal Biology Course

Phylogenetic trees provide visual representations of ancestor-descendant relationships, a core concept of evolutionary theory. We introduced "tree thinking" into our introductory organismal biology course (freshman/sophomore majors) to help teach organismal diversity within an evolutionary framework. Our instructional strategy consisted of designing and implementing a set of experiences to help...

متن کامل

Simulating sequences and phylogenetic trees

Using the seqgen() function available in the phyclust package [1], data were simulated by mutating DNA sequences along phylogenetic trees. The topology of the trees were generated at two stages via the ms program [1, 2]. At the first stage we randomly generated a root sequence and a star-like ancestor tree having equal branch lengths and tips equal to the number of desired clusters. The tip lab...

متن کامل

Fast Ordered Tree Matching for XML Query Evaluation

− An XML tree pattern query, represented as a labeled tree, is essentially a complex selection predicate on both structure and content of an XML. Tree pattern matching has been identified as a core operation in querying XML data. We distinguish between two kinds of tree pattern matchings: ordered and unordered tree matching. By the unordered tree matching, only ancestor/descendant and parent/ch...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007